import 'package:flutter/material.dart';
import "package:get/get.dart";

class EnterpriseCertification extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Color(0xfff5f5f5),
        body: Column(
          children: [
            Stack(
              children: [
                Container(
                  child: Image.asset(
                    'static/images/hometop.png',
                    fit: BoxFit.fitWidth,
                  ),
                ),
                Positioned(
                  left: 8.0,
                  top: 20,
                  child: IconButton(
                    onPressed: () {
                      Get.back();
                      print('object');
                    },
                    icon: Image.asset(
                      'static/images/back.png',
                      width: 22,
                      fit: BoxFit.fitWidth,
                    ),
                  ),
                ),
                Positioned(
                    left: 0,
                    right: 0,
                    top: 30,
                    child: Align(
                      child: Text('企业认证'),
                    )),
              ],
            ),
            Container(
              transform: Matrix4.translationValues(0.0, -20.0, 0.0),
              height: 550,
              width: 350,
              decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(10),
                  color: Color(0xffffffff)),
              padding: EdgeInsets.only(top: 20, left: 15, right: 15),
              margin: EdgeInsets.symmetric(horizontal: 15),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text(
                    '请填写企业信息',
                    style: TextStyle(fontSize: 16),
                  ),
                  Text(
                    '认证成功后开启专属企业服务!',
                    style: TextStyle(fontSize: 12, color: Color(0xff999999)),
                  ),
                  Container(
                      margin: EdgeInsets.only(top: 20),
                      decoration: BoxDecoration(
                          color: Color(0xfff5f5f5),
                          borderRadius: BorderRadius.circular(40)),
                      child: Row(
                        children: [
                          SizedBox(
                            width: 20,
                          ),
                          Text(
                            '企业名称',
                            style: TextStyle(fontSize: 12),
                          ),
                          SizedBox(
                            width: 20,
                          ),
                          Expanded(
                            child: TextField(
                              textAlign: TextAlign.left, // 文本右对齐
                              style: TextStyle(fontSize: 12),
                              decoration: InputDecoration(
                                hintStyle: TextStyle(
                                    fontSize: 12, color: Color(0xff999999)),
                                border: InputBorder.none, // 隐藏输入框默认边框
                                hintText: '请填写营业执照上的全称', // 提示文本
                              ),
                            ),
                          )
                        ],
                      )),
                  Container(
                      margin: EdgeInsets.only(top: 20),
                      decoration: BoxDecoration(
                          color: Color(0xfff5f5f5),
                          borderRadius: BorderRadius.circular(40)),
                      child: Row(
                        children: [
                          SizedBox(
                            width: 20,
                          ),
                          Text(
                            '证件号码',
                            style: TextStyle(fontSize: 12),
                          ),
                          SizedBox(
                            width: 20,
                          ),
                          Expanded(
                            child: TextField(
                              textAlign: TextAlign.left, // 文本右对齐
                              style: TextStyle(fontSize: 12),
                              decoration: InputDecoration(
                                hintStyle: TextStyle(
                                    fontSize: 12, color: Color(0xff999999)),
                                border: InputBorder.none, // 隐藏输入框默认边框
                                hintText: '请填写18位统一社会信用代码', // 提示文本
                              ),
                            ),
                          )
                        ],
                      )),
                  Expanded(child: Center()),
                  Align(
                        child: Column(
                      children: [
                        Text(
                          'OSG将对信息加密，实时保障信息安全',
                          style:
                              TextStyle(color: Color(0xff999999), fontSize: 12),
                        ),
                        GestureDetector(
                          onTap:()=>{
                              Get.toNamed('/certification')
                          },
                          child: Container(
                            margin: EdgeInsets.only(top: 5),
                            alignment: Alignment.center,
                            decoration: BoxDecoration(
                              borderRadius: BorderRadius.circular((50)),
                              gradient: LinearGradient(
                                colors: [
                                  Color(0xff2189E7),
                                  Color(0xffBF67F8),
                                ], // 定义颜色列表
                                begin: Alignment.topLeft, // 渐变开始的位置
                                end: Alignment.bottomRight, // 渐变结束的位置
                              ),
                            ),
                            width: 240,
                            height: 40,
                            child: Text(
                              '提交',
                              style: TextStyle(
                                  fontSize: 16, color: Color(0xffffffff)),
                            ),
                          ),
                        ),
                      ],
                    ),
                  ),
                  SizedBox(
                    height: 20,
                  )
                ],
              ),
            )
          ],
        ));
  }
}
